package com.yuanluludev.app.room.student

import androidx.room.Entity
import androidx.room.PrimaryKey
import androidx.room.TypeConverters
import com.yuanluludev.app.room.book.Book
import com.yuanluludev.app.room.book.BookConverter
import com.yuanluludev.app.room.book.Family
import com.yuanluludev.app.room.book.FamilyConverter

@Entity
@TypeConverters(BookConverter::class,FamilyConverter::class)
data class Student(

    @PrimaryKey(autoGenerate = true) //最好是Long
    var uid: Long = 0,

    var name: String?="",

    var age: Int?=0,

    var address: String?="",

    var books: List<Book>? = null,

    var family: Family? = null

)